import "./assets/main.css";
import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import ElementPlus from "element-plus";
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
import zhCn from "element-plus/dist/locale/zh-cn.mjs"; // 导入中文语言包
import { createPinia } from 'pinia';
import "@/utils/global";

import "element-plus/dist/index.css";
// 导入暗黑模式样式
import "element-plus/theme-chalk/dark/css-vars.css";

// mock
import "./mock/mock.js";
// store
import "./store";
//注册icon图标
const app = createApp(App);
const pinia = createPinia();

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component as any);
}

app.use(ElementPlus, {
  locale: zhCn, // 设置中文
});
app.use(router);
app.use(store);
app.use(pinia);
app.mount("#app");
